//
//  DetailCell.m
//  YouMin_iOS
//
//  Created by FanYanLong on 15/12/10.
//  Copyright © 2015年 wey. All rights reserved.
//

#import "DetailCell.h"

@interface DetailCell ()
@property (weak, nonatomic) IBOutlet UIImageView *PhotoImageView;

@property (weak, nonatomic) IBOutlet UILabel *TextLable;

@end


@implementation DetailCell
//初始化
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
    }
    return self;
}
-(void)setModel:(DetailModel *)model{
    _model = model;
    [self.PhotoImageView sd_setImageWithURL:[NSURL URLWithString:model.photo_1600]];
    if (model.text == nil) {
      self.PhotoImageView.frame = CGRectMake(0, 0, self.contentView.frame.size.width, self.contentView.frame.size.height);
    }else{
        self.TextLable.text = model.text;
    }
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
